<%@page import="bean.FmBoardVo"%>
<%@page import="bean.FmBoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel = 'stylesheet' href='./FmBoard/Board.css'/>
<script src='./FmBoard/Board.js'></script>
</head>
<body>


<%
FmBoardVo vo = new FmBoardVo(request);
FmBoardDTO dto = new FmBoardDTO();
dto.setVo(vo);
FmBoardVo v =null;
boolean b = dto.insert((String)session.getAttribute("sessionMid"));
if(b){

v = dto.selectOne();
%>



<h1><%=vo.getSubject() %></h1>


<table align='center' border = '1'>
<tr>
	<td rowspan=4><%if(v.getPic()!=null){ %><img src='./BoardPhoto/sm_<%=v.getPic() %>' align="middle" alt ='사진' width='100px' height='100px'>
	<%}else{ %><img src='./FmBoard/noImg.png' align="middle" alt ='사진' width='100px' height='100px'><%} %></td>
	<td bgcolor='#99ccff'>작성자</td>
	<td><%=v.getMid() %></td>
	<td bgcolor='#99ccff'>등록일자</td>
	<td><%if(v.getWdate()!=null){%><%=v.getWdate().substring(0,10)%><%} %></td></tr>
<tr>
	<td bgcolor='#99ccff'>보호지역</td>
	<td><%if(v.getLocate()!=null){%><%=v.getLocate() %><%} %></td>
	<td bgcolor='#99ccff'>연락처</td>
	<td><%if(v.getPhone() != null){ %><%=v.getPhone()%><%} %></td></tr>
<tr>
	<td bgcolor='#99ccff'>품종</td>
	<td><%if(v.getKind()!=null){%><%=v.getKind() %><%} %></td>
	<td bgcolor='#99ccff'>성별</td>
	<td><%if(v.getGender()!=null){%><%=v.getGender()%><%} %></td></tr>
<tr>
	<td bgcolor='#99ccff'>나이</td>
	<td><%if(v.getAge()!=null){%><%=v.getAge()%> 살 <%} %> </td>
	<td bgcolor='#99ccff'>책임비</td>
	<td><%=v.getMoney() %> 원</td></tr>	
<tr>
	<td colspan=5><div id='con'><pre><%=v.getContent() %></pre></div></td></tr>
</table>
<p/><p/><p/>

<%
}else{
	%>틀렸어.<% 
}

%>



<input type='button' value='게시글 수정' id='btnModify'/>
<input type='button' value='게시글 삭제' id='btnDelete'/>
<input type='button' value='게시글 목록' id='btnList'/>


<form name='hiddenFrm' method='post'>
	<input type='hidden' name='nowPage' value='<%=vo.getNowPage()%>'/>
	<input type='hidden' name='kindFind' value='<%=vo.getKindFind()%>'/>
	<input type='hidden' name='locateFind' value='<%=vo.getLocateFind()%>'/>
	<input type='hidden' name='genderFind' value='<%=vo.getGenderFind()%>'/>
	<input type='hidden' name='find' value='<%=vo.getFind()%>'/>
	<input type='hidden' name='rno' value='<%=v.getRno()%>'/>
	
</form>






<script>bViewInit();</script>
</body>
</html>